package com.purchase.ml.entity.dealer;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_dealer")
@ApiModel(value = "SysDealer", description = "经销商表")
public class SysDealer implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 创建时间
     */
    @TableField(value = "create_at")
    @ApiModelProperty(value = "创建时间")
    private Date createAt;

    /**
     * 更新时间
     */
    @TableField(value = "update_at")
    @ApiModelProperty(value = "更新时间")
    private Date updateAt;

    /**
     * 上级经销商ID；大代理为0
     */
    @TableField(value = "superior")
    @ApiModelProperty(value = "上级经销商ID；大代理为0")
    private Long superior;

    /**
     * 经销商名称
     */
    @TableField(value = "dealer_name")
    @ApiModelProperty(value = "经销商名称")
    private String dealerName;

    /**
     * 经销商名称2
     */
    @TableField(value = "last_name")
    @ApiModelProperty(value = "经销商名称2")
    private String lastName;

    /**
     * 马来营业执照号码
     */
    @TableField(value = "syarikat_code")
    @ApiModelProperty(value = "马来营业执照号码")
    private String syarikatCode;

    /**
     * 注册码
     */
    @TableField(value = "regist_code")
    @ApiModelProperty(value = "注册码")
    private String registCode;

    /**
     * 邀请码
     */
    @TableField(value = "invite_code")
    @ApiModelProperty(value = "邀请码")
    private String inviteCode;

    /**
     * 电话
     */
    @TableField(value = "phone_number")
    @ApiModelProperty(value = "电话")
    private String phoneNumber;

    /**
     * 图片地址
     */
    @TableField(value = "logo_url")
    @ApiModelProperty(value = "图片地址")
    private String logoUrl;

    /**
     * 公司类型：0：Berhad；1：Sdn Bhd 2：Partnership；3：erprise 4：Others
     */
    @TableField(value = "type_company")
    @ApiModelProperty(value = "公司类型：0：Berhad；1：Sdn Bhd 2：Partnership；3：erprise 4：Others")
    private Integer typeCompany;

    /**
     * 业务类型
     */
    @TableField(value = "type_business")
    @ApiModelProperty(value = "业务类型")
    private String typeBusiness;

    /**
     * 邮箱地址
     */
    @TableField(value = "email_address")
    @ApiModelProperty(value = "邮箱地址")
    private String emailAddress;

    /**
     * 商户地址id
     */
    @TableField(value = "dealer_id")
    @ApiModelProperty(value = "商户id")
    private Long dealerId;

    /**
     * 账单地址id
     */
    @TableField(value = "billing_addr_id")
    @ApiModelProperty(value = "账单地址id")
    private Long billingAddrId;

    /**
     * 购物地址id
     */
    @TableField(value = "shop_addr_id")
    @ApiModelProperty(value = "购物地址id")
    private Long shopAddrId;

    /**
     * 经销商类型 0：大代理；1：主经销商；2经销商
     */
    @TableField(value = "dealer_type")
    @ApiModelProperty(value = "经销商类型 2：大代理；3：主经销商；4经销商")
    private Integer dealerType;

    /**
     * 状态：0申请；1通过；2禁用
     */
    @TableField(value = "state")
    @ApiModelProperty(value = "状态：0申请；1通过；2禁用；3删除")
    private Integer state;

    @TableField(value = "region")
    @ApiModelProperty(value = "01234 分别对应中东西南北")
    private Integer region;

    @TableField(value = "certificate_url")
    @ApiModelProperty(value = "证书地址：或者身份证图片URL")
    private String certificateUrl;

    @TableField(value = "utility_bill_url")
    @ApiModelProperty(value = "杂费图片URL")
    private String utilityBillUrl;

    @TableField(value = "id_card_number")
    @ApiModelProperty(value = "身份证号码")
    private String idCardNumber;

    @TableField(value = "company_type")
    @ApiModelProperty(value = "公司类型：0公司；1个人")
    private Integer companyType;

    @TableField(value = "is_auth")
    @ApiModelProperty(value = "经销商是否被认证")
    private Integer isAuth;

    @TableField(exist = false)
    @ApiModelProperty(value = "购物地址")
    private SysAddr shopAddr;

    @TableField(exist = false)
    @ApiModelProperty(value = "账单地址")
    private SysAddr billingAddr;

    @TableField(exist = false)
    @ApiModelProperty(value = "注册原因")
    private String registerResion;

    @TableField(value = "need_pay")
    @ApiModelProperty(value = "创建主经销是否需要支付：0不需要；1需要")
    private Integer needPay;

    @TableField(value = "is_paid")
    @ApiModelProperty(value = "是否支付")
    private Integer isPaid;  //如果要每年支付一次；每天定时遍历商户查询payinfo 的表时间间隔；超过都定时间 更新为需要支付；

    private static final long serialVersionUID = 1L;
}